import {
  CREATE_EXPO_OPEN,
  EDIT_EXPO_OPEN,
  EDIT_EXPO_ITEM,
  EXPO_OPERATION_RECORD_OPEN,
  MODULE_OPERATION_RECORD_OPEN,
  EDIT_MODULE_OPEN,
  EDIT_MODULE_FRIST_OPEN,
  CREATE_MODULE_OPEN,
  CREATE_MODULE_FRIST_OPEN,
  RESET_PASSWORD_OPEN,
  CREATE_MODULE_ITEM,
  EDIT_MODULE_ITEM,
  PREVIEW_MEDIA_OPEN,
  PREVIEW_MEDIA_ITEM,
  COMMON_DIALOG_OPEN,
  SHARE_EXPO_OPEN,
  DOWNLOAD_OPEN,
  IMG_LOADING
} from './mutation-types'

const customModule = {
  namespaced: true,
  state: {
    isOpenCommon: false,
    isOpenCreateExpo: false,
    isOpenEditExpo: false,
    isOpenExpoOperationRecord: false,
    isOpenModuleOperationRecord: false,
    isOpenCreateModule: false,
    isOpenCreateFristModule: false,
    isOpenEditModule: false,
    isOpenEditFristModule: false,
    isOpenPreviewMedia: false,
    isOpenResetPassword: false,
    isOpenShareExpo: false,
    isOpenDownload: false,
    isOpenImgLoading:false,
    editExpoItem: {},
    createModuleItem: {},
    editModuleItem: {},
    previewMediaItem: {}
  },
  mutations: {
    [COMMON_DIALOG_OPEN](state, data) {
      state.isOpenCommon = data;
    },
    [CREATE_EXPO_OPEN](state, data) {
      state.isOpenCreateExpo = data;
    },
    [EDIT_EXPO_OPEN](state, data) {
      state.isOpenEditExpo = data;
    },
    [EXPO_OPERATION_RECORD_OPEN](state, data) {
      state.isOpenExpoOperationRecord = data;
    },
    [MODULE_OPERATION_RECORD_OPEN](state, data) {
      state.isOpenModuleOperationRecord = data;
    },
    [EDIT_MODULE_OPEN](state, data) {
      state.isOpenEditModule = data;
    },
    [EDIT_MODULE_FRIST_OPEN](state, data) {
      state.isOpenEditFristModule = data;
    },
    [CREATE_MODULE_OPEN](state, data) {
      state.isOpenCreateModule = data;
    },
    [CREATE_MODULE_FRIST_OPEN](state, data) {
      state.isOpenCreateFristModule = data;
    },
    [EDIT_EXPO_ITEM](state, data) {
      state.editExpoItem = data;
    },
    [CREATE_MODULE_ITEM](state, data) {
      state.createModuleItem = data;
    },
    [EDIT_MODULE_ITEM](state, data) {
      state.editModuleItem = data;
    },
    [PREVIEW_MEDIA_OPEN](state, data) {
      state.isOpenPreviewMedia = data;
    },
    [PREVIEW_MEDIA_ITEM](state, data) {
      state.previewMediaItem = data;
    },
    [RESET_PASSWORD_OPEN](state, data) {
      state.isOpenResetPassword = data;
    },
    [SHARE_EXPO_OPEN](state, data) {
      state.isOpenShareExpo = data;
    },
    [DOWNLOAD_OPEN](state, data) {
      state.isOpenDownload = data;
    },
    [IMG_LOADING](state, data) {
      state.isOpenImgLoading = data;
    }
  },
  actions: {}
}
export default customModule
